﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ModifyDialog : MonoBehaviour {
    public InputField accountmodify;
    public InputField passmodify;
    // Use this for initialization

    ACItem acitem;
    public void ShowModifyDialog(ACItem item)
    {
        acitem = item;
        accountmodify.text = item.item.Account;
        passmodify.text = item.item.PassWord;
        gameObject.SetActive(true);
    }



    public void OnOK() {
        acitem.item.Account = accountmodify.text;
        acitem.item.PassWord = passmodify.text;
        acitem.OnSave();
        SaveFile.Singleton.OnClickGet();
        CloseDialog();

    }

    public void CloseDialog() {
        gameObject.SetActive(false);
    }



}
